home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / mtl < prev    next >
Internet Message Format  |  1995-03-31  |  5KB

  1. Path: seq!spell
  2. From: Detlef Mueller <detlef@mwhh.hanse.de>
  3. Subject:  v01i028:  mtl - Error messages in own libraries v1.0, Part01/01
  4. Newsgroups: comp.sources.hp48
  5. Keywords: libraries library error message tables
  6. Organization: M. Witt
  7. Followup-To: comp.sys.hp48
  8. Approved: spell@seq.uncwil.edu
  9.  
  10. Checksum: 3930115074 (verify with brik -cv)
  11. Submitted-by: Detlef Mueller <detlef@mwhh.hanse.de>
  12. Posting-number: Volume 1, Issue 28
  13. Archive-name: mtl/part01
  14.  
  15. BEGIN_DOC mtl.doc
  16. Hello, world.
  17.  
  18. Include messages into a library with the RPL tools ? The manuals give no
  19. answers, so I had to find it out 8-). I think the files are self-explaining.
  20. To install the little demonstration library, process the following steps:
  21.     1) Cut out the listings and put them into the appropriate files
  22.     2) Run MKMSGTST.BAT
  23.     3) Download the resulting file MTL.LIB into your HP48
  24.     4) Recall MTL.LIB onto the stack
  25.     5) Enter the port number (0,1,2) where you want to store it and
  26.        press STO.
  27.     6) Switch the HP48 off, then on again.
  28. MTL.LIB will now be installed as a library named MSGTST, ID nr. 809.
  29. Try the programs MSG1, MSG2 and MSG3.
  30.  
  31. 'Hope, this is a useful information,
  32.     =-), Detlef.
  33.  
  34. END_DOC
  35. Files:
  36.  
  37. --v--MSGTST.S--8<------------------------------------------------------------
  38. BEGIN_SRC msgtst.s
  39. *****************************************************************************
  40. * Modulname:    Message Test
  41. * Modultype:    Library
  42. * Dest.Comp.:    HP48
  43. * Language:    System RPL
  44. * Author:    Detlef Mueller, Nibelungenweg 6, 2000 Hamburg 56, W-Germany
  45. * Interface:    MSG1, MSG2, MSG3
  46. * Description:    Test library message handling
  47. * Edition History :
  48. *    0.000    08-25-1991    DM    Alpha version
  49. *****************************************************************************
  50.     TITLE    Message Test
  51. xROMID        329
  52.     ASSEMBLE
  53. MTROMID    EQU    #329
  54. DOMSG    MACRO    * romid,msgnr    ** Macro, to handle msg nr. generation **
  55.     CON(5)    =DOBINT
  56.     CON(5)    ($1)*256+($2)        * (ROMID << 8) | msgnr *
  57. DOMSG    ENDM
  58.     NIBASC    /HPHP48-E/    ** Binary download header **
  59.     RPL
  60. EXTERNAL    xMSG1        ** External definitions **
  61. EXTERNAL    xMSG2
  62. EXTERNAL    xMSG3
  63.  
  64. *** MTLmsg ******************************************************************
  65. * Description :    Message table
  66. *****************************************************************************
  67.     ASSEMBLE
  68. =MTLmsg
  69.     RPL
  70. ARRY
  71. [
  72.     "Memory Lost !?"
  73.     "Achou .."
  74.     "27B-6, 27B-6 ..."
  75. ]
  76. *** MTLcfg ******************************************************************
  77. * Interface :    ( --> )
  78. * Description :    Attach this library at system warmstart
  79. *****************************************************************************
  80.     ASSEMBLE
  81. =MTLcfg
  82.     RPL
  83. ::
  84.     DOBINT MTROMID XEQSETLIB        ( *Autoattach* )
  85. ;
  86. *** MSG1 ********************************************************************
  87. * Interface :    ( --> )
  88. * Description :    Just generate an error with error message 1
  89. *****************************************************************************
  90.     ASSEMBLE
  91.     CON(1)    8            * Tell parser 'Non algebraic' *
  92.     RPL
  93. xNAME    MSG1
  94. ::
  95.     CK0
  96.     ASSEMBLE
  97.     DOMSG    MTROMID,1
  98.     RPL
  99.     ERROROUT
  100. ;
  101. *** MSG2 ********************************************************************
  102. * Interface :    ( --> )
  103. * Description :    Just generate an error with error message 2
  104. *****************************************************************************
  105.     ASSEMBLE
  106.     CON(1)    8
  107.     RPL
  108. xNAME    MSG2
  109. ::
  110.     CK0
  111.     ASSEMBLE
  112.     DOMSG    MTROMID,2
  113.     RPL
  114.     ERROROUT
  115. ;
  116. *** MSG3 ********************************************************************
  117. * Interface :    ( --> )
  118. * Description :    Just generate an error with error message 3
  119. *****************************************************************************
  120.  
  121.     ASSEMBLE
  122.     CON(1)    8
  123.     RPL
  124. xNAME    MSG3
  125. ::
  126.     CK0
  127.     ASSEMBLE
  128.     DOMSG    MTROMID,3
  129.     RPL
  130.     ERROROUT
  131. ;
  132. END_SRC
  133. --^--MSGTST.S--8<------------------------------------------------------------
  134.  
  135. --v--MSGTST.MN--8<-----------------------------------------------------------
  136. BEGIN_SRC msgtst.mn
  137. TITLE Msg Test Library
  138. OUTPUT mtl.o
  139. LLIST mtl.lr
  140. CONFIGURE MTLcfg
  141. MESSAGE MTLmsg
  142. NAME MSGTST: v0.0,DM'91
  143. ROMPHEAD mtlhead.a
  144. REL msgtst.o
  145. TABLE mtlhash.a
  146. FINISH mtlend.a
  147. END
  148. END_SRC 
  149. --^--MSGTST.MN--8<-----------------------------------------------------------
  150.  
  151. --v--MTL.M--8<---------------------------------------------------------------
  152. BEGIN_SRC mtl.m
  153. TITLE Msg Tst Library
  154. OUTPUT mtl.lib
  155. OPTION CODE
  156. LLIST mtllib.lr
  157. SUPPRESS XR
  158. SEARCH entries.o
  159. REL mtl.o
  160. CK LIB329 SYSEND329
  161. END_SRC
  162. --^--MTL.M--8<---------------------------------------------------------------
  163.  
  164. --v--MKMSGTST.BAT--8<--------------------------------------------------------
  165. BEGIN_SRC mkmsgtst.bat
  166. RPLCOMP msgtst.S msgtst.A msgtst.EXT
  167. SASM -e msgtst
  168. MAKEROM msgtst.MN msgtst.M
  169. SASM -e -N mtlHEAD
  170. SASM -e -N mtlHASH
  171. SASM -e -N mtlEND
  172. SLOAD msgtst.M
  173. SLOAD -H mtl.M
  174. END_SRC
  175. --^--MKMSGTST.BAT--8<--------------------------------------------------------
  176. -- 
  177. +-----------------------------------+---------------------------------------+
  178. |        `I'll just nip off         |             Detlef Mueller            |
  179. |         and shoot myself.`        |          detlef@mwhh.hanse.de         |
  180. |  Animal in THGTTG, part II, p.94  |...!uunet!mcsun!unido!mcshh!mwhh!detlef|
  181. +-----------------------------------+---------------------------------------+
  182.  
  183.